package com.pcbly.web.business.table; 

import java.util.List;

import com.pcbly.web.bean.table.ColumnBean;
import com.pcbly.web.business.BaseServiceImp; 
import com.pcbly.web.persistence.table.ColumnDao;

public class ColumnServiceImp extends BaseServiceImp<ColumnBean> implements
		ColumnService {
	public ColumnServiceImp(){
		super();
	}
	private ColumnDao columnDao;
	
	
	public void setColumnDao(ColumnDao columnDao) {
		this.columnDao = columnDao;
	}

	@Override
	public void deleteColumnBean(String id) throws Exception {
		// TODO Auto-generated method stub
		columnDao.removeById(id);
	}

	@Override
	public void deleteColumnBeans(List<ColumnBean> beans) throws Exception {
		// TODO Auto-generated method stub
		columnDao.deleteColumnBeans(beans);
	}

	@Override
	public void deleteColumnBeansById(String id) throws Exception {
		// TODO Auto-generated method stub
		columnDao.deleteColumnBeansById(id);
	}

	@Override
	public List<ColumnBean> findColumnBeansFromDatabase(String tableName)
			throws Exception {
		// TODO Auto-generated method stub
		return columnDao.findColumnBeansFromDatabase(tableName);
	}

	@Override
	public ColumnBean getColumnBeanById(String id) throws Exception {
		// TODO Auto-generated method stub
		return columnDao.get(id);
	}

	@Override
	public List<ColumnBean> getColumnBeansByTableId(String tableId)
			throws Exception {
		// TODO Auto-generated method stub
		return columnDao.getColumnBeansByTableId(tableId);
	}

	@Override
	public void saveColumnBean(ColumnBean bean) throws Exception {
		// TODO Auto-generated method stub
		columnDao.saveColumnBean(bean);
	}

	@Override
	public void saveColumnBeans(List<ColumnBean> beans) throws Exception {
		// TODO Auto-generated method stub
		columnDao.saveColumnBeans(beans);
	}

	@Override
	public void updateColumnBean(ColumnBean bean) throws Exception {
		// TODO Auto-generated method stub
		columnDao.updateColumnBean(bean);
	}

	@Override
	public void updateColumnBeans(List<ColumnBean> beans) throws Exception {
		// TODO Auto-generated method stub
		columnDao.updateColumnBeans(beans);
	}

	@Override
	public boolean checkName(String name) throws Exception {
		// TODO Auto-generated method stub
		return columnDao.checkName(name);
	}

	@Override
	public List<ColumnBean> findColumnBeansBytableIds(String tableIds)
			throws Exception {
		// TODO Auto-generated method stub
		return columnDao.findColumnBeansBytableIds(tableIds);
	}

	@Override
	public void createTableExtention(String tableName) throws Exception {
		// TODO Auto-generated method stub
		columnDao.createTableExtention(tableName);
	}


}
